UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gWEcuxMqJNBdonu4IZWY/fokthCKYVxPbA1x85W//+4='
WHERE
key_id = '5c1cd15f8771c70606160f5aa3b9887cc8509a4d2ced71d8d6f2383d0712ce04'
AND (
token = 'gWEcuxMqJNBdonu4IZWY/fokthCKYVxPbA1x85W//+4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)