UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1qRPuAFB+fVuWZuoVlB/ma66MF0eds68dD5+EsRWfi8='
WHERE
key_id = '25509d52ad41a109f3bf82dbd1b0ab46cc95e1aae9056cb0de879e4e453b5f61'
AND (
token = '1qRPuAFB+fVuWZuoVlB/ma66MF0eds68dD5+EsRWfi8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)