UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NTYEeAERHjlpUlc6PWlTzItCZKwgnGcuKTdR2QMnhoU='
WHERE
key_id = '75278628b1675d4f1fe4116ef929ee0a20ced26d2866798c3e2b0ee2ed2b5beb'
AND (
token = 'NTYEeAERHjlpUlc6PWlTzItCZKwgnGcuKTdR2QMnhoU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)