UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DS3VclnHRzFyQWbNdieVelxE7L/LxXVDljChgK4mr4g='
WHERE
key_id = '56ff910ab0b4a43afc39ab1ea972a4a6911d1c73ac4dfb2305956f1e008e8af9'
AND (
token = 'DS3VclnHRzFyQWbNdieVelxE7L/LxXVDljChgK4mr4g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)