UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mNnAIbkpTl03U6Er+4bfsyISk8Ai03tLTl9u9ZAx8F0='
WHERE
key_id = 'f2ce7040fff87946222bd6cf5091259c1bffdbae3d1105cdb4ab36390d843113'
AND (
token = 'mNnAIbkpTl03U6Er+4bfsyISk8Ai03tLTl9u9ZAx8F0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)