UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ViXLXVVuiJC64EEWl80pL/culOZEUSl/IsWMm3YZBig='
WHERE
key_id = '5a0ad025b957d4531beb04a8478d7642fe50de1cf70eafb286a5882e8ba8ae3f'
AND (
token = 'ViXLXVVuiJC64EEWl80pL/culOZEUSl/IsWMm3YZBig='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)