UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o7BvIsngw6yKb8rmuSvBJ6TdJ1LXQTG7L0x/RgGoJVY='
WHERE
key_id = '6903d926a071473b8ef959448980d63cdc97e243b9b4f507d9ccb7e95451076d'
AND (
token = 'o7BvIsngw6yKb8rmuSvBJ6TdJ1LXQTG7L0x/RgGoJVY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)