UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EloJWzFJ32LSF4pj1Ww9EmOOq2XTsTJNmmZDEyhlu7Y='
WHERE
key_id = '035f583cccd789313b7315f5579e2728c6fc9e18127a0e1dae3795390b78a603'
AND (
token = 'EloJWzFJ32LSF4pj1Ww9EmOOq2XTsTJNmmZDEyhlu7Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)