UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qV3NFHhZYAlhUp0L0jCaI9+3PhuMPHvZs0hVc5cxg7A='
WHERE
key_id = '195124c20956a290892b5e30d213cc33bea6af2c45a16a01026dccacff67e38a'
AND (
token = 'qV3NFHhZYAlhUp0L0jCaI9+3PhuMPHvZs0hVc5cxg7A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)