UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IU/vEM5kCuNSjJNsXv2eeDcfPFUS7uD0Ep5Cd5dtq2I='
WHERE
key_id = 'c00a8cbc063651ea589d6b5eba8bc93ce9b97d2add59e3f94b863438f17e6836'
AND (
token = 'IU/vEM5kCuNSjJNsXv2eeDcfPFUS7uD0Ep5Cd5dtq2I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)