UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VTO/HJLhq4ws0xzL1i3P11RRHg8aGzX4U0Uf0Ah38cU='
WHERE
key_id = '44de706ab3de85cad59c2ef019accf88bbf8af9f46012044dfca038eb0c77a90'
AND (
token = 'VTO/HJLhq4ws0xzL1i3P11RRHg8aGzX4U0Uf0Ah38cU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)