UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oEr8BAAenY/NWAIXgr9QyFbHrm0voR0Lqv2jrh8FlT0='
WHERE
key_id = '53b6f56d4c10e671bdac8ea9ed7722a598a32a5440d2eabdaa823882c1797beb'
AND (
token = 'oEr8BAAenY/NWAIXgr9QyFbHrm0voR0Lqv2jrh8FlT0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)