UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'B6VMso1TmKddb7z6/XS9eJ+kyxLrR9ZPm61U/hZ1p9g=' 
WHERE 
  key_id = '2210a7315465cb4516d915a06ddc5a5a9caa23b27eda09b0ed6f8d57f1d9676c' 
  AND (
    token = 'B6VMso1TmKddb7z6/XS9eJ+kyxLrR9ZPm61U/hZ1p9g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018