UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oNJracNztTWSpuYMPFb75Ws4MuBwZlzV4l/qtKmrT/g='
WHERE
key_id = 'eddf7ebfe8ae1bce9277937bbbb1157066c08f6c51114c378c9bb7ecfadf0044'
AND (
token = 'oNJracNztTWSpuYMPFb75Ws4MuBwZlzV4l/qtKmrT/g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)