UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UFiZzO0tkik02m1U3ABQnKjv682MoLsr0VVE3eqc498='
WHERE
key_id = '55cf0112a2f964c565c7dd55a379adb60024cb3bbf39326f6d8585dfa9aff684'
AND (
token = 'UFiZzO0tkik02m1U3ABQnKjv682MoLsr0VVE3eqc498='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)