UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iyErPPq+2Ks+BqoQDyH//uljzUwPLqMGwbDqI+kJQQM='
WHERE
key_id = '041f2300096d8291a42b81685091af350625fdea341f8bb6f79cf1351bb9c8d6'
AND (
token = 'iyErPPq+2Ks+BqoQDyH//uljzUwPLqMGwbDqI+kJQQM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)