UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YJtSQOkdS05LDtAxPPLFzmkjUvJHb2z5Bslhl35Mtas='
WHERE
key_id = '9cb36ae54c21922c1f1943d1113b2370756d676a36535e50f532433715d59def'
AND (
token = 'YJtSQOkdS05LDtAxPPLFzmkjUvJHb2z5Bslhl35Mtas='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)