UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eEwM/1BM4pJm75Od7F0Ax4KXNZeZhNgKUmpN3sCGUEI='
WHERE
key_id = 'b72955c13ceb9951304d565f944a5cf7ae015a99b64be1c9b6ffeb8057d2c2c1'
AND (
token = 'eEwM/1BM4pJm75Od7F0Ax4KXNZeZhNgKUmpN3sCGUEI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)