UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pxeBV367NXov4YNkiorN3nZ676Agf4SQH58Bh+UYJV8='
WHERE
key_id = 'f5cb27d2840e59bdbf837fbdecb8dd4253ddeb3b7a7cf08d39aca9083070c093'
AND (
token = 'pxeBV367NXov4YNkiorN3nZ676Agf4SQH58Bh+UYJV8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)