UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'h/RWY7eXWP75JVUmrlGZNs1nOo0XoNguhXEfERFymfY='
WHERE
key_id = '44c69a38262ad20ad9114ff36bd6c5409d7fe9e99761178178ff242231d3adb6'
AND (
token = 'h/RWY7eXWP75JVUmrlGZNs1nOo0XoNguhXEfERFymfY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)