UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ju8oJb6m2xJWC2XMDqz68xBxLA5Zxq4Fv1NGOuEs7gk='
WHERE
key_id = '62deab533b7395f15ec9ac86ee6d4063bbeebf4913cf83e4b2c1649aa190831d'
AND (
token = 'Ju8oJb6m2xJWC2XMDqz68xBxLA5Zxq4Fv1NGOuEs7gk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)