UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PKnIbV5RFUisDSsq/g1Wp6B7D4n+lG08P90vZ7GAr5g='
WHERE
key_id = '88500bccde5f2a25808df675d51a06018768f28722c14a5db5c03bec667fbd5d'
AND (
token = 'PKnIbV5RFUisDSsq/g1Wp6B7D4n+lG08P90vZ7GAr5g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)