UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HAXtYkD7/Y5y7zCtmmQfyS++epFXN3MZzXzSNoEfn8E='
WHERE
key_id = '72ea81cef4d914bfa62275e9cc28f29dd711a9c22d880419d60abbba2f2f351b'
AND (
token = 'HAXtYkD7/Y5y7zCtmmQfyS++epFXN3MZzXzSNoEfn8E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)