UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FMjruh7LmMUyZbfEx9gWhvy+DYV9sfUsWVh3tcCSHsY=' 
WHERE 
  key_id = '87f5fd841bba0ca78889198892200add10e0cedaafd5a9fe32277dbc34f70699' 
  AND (
    token = 'FMjruh7LmMUyZbfEx9gWhvy+DYV9sfUsWVh3tcCSHsY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028