UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vyv+FMt5emXbLJTQxSsrjJ4FBleCng9ZaqTLmr466aY='
WHERE
key_id = '503f34b506044f3c0a0f1c6aa0deb10494c614178c671479d940fd7570667a35'
AND (
token = 'vyv+FMt5emXbLJTQxSsrjJ4FBleCng9ZaqTLmr466aY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)