UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pXJPRkjgTZH0/XXOFJxAeD0ZR/FRBBT8z9Csqy94ivw='
WHERE
key_id = '53c1ef10be7cc31f600b8eaa6868fa7deca7c7271a35c604654bf9e0f9a70d45'
AND (
token = 'pXJPRkjgTZH0/XXOFJxAeD0ZR/FRBBT8z9Csqy94ivw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)