UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8pDwuqTHGyWXJmkz9LCIevCs6iVitXrk+XUjSzOmQmQ='
WHERE
key_id = '07ff0d2f2d00210125c4ebbf9ee8987ba6ff3d86bc12cf62483b00e20ac1ef99'
AND (
token = '8pDwuqTHGyWXJmkz9LCIevCs6iVitXrk+XUjSzOmQmQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)